package com.learn.mvc.handler;

import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 自定义 LoginInterceptor 拦截器
 */
public class LoginInterceptor implements HandlerInterceptor {
    // ctrl + i 实现接口的方法
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        System.out.println("执行了 LoginInterceptor 拦截器的方法");
        return true;
    }
}
